#include<stdio.h>
int fun(int x,int n)
{
  if(n>1)
  {
    return (x+1)*fun(x,n-1);
  }
  else if(n==1)
  {
    return x;
  }
}
void main()
{
  int x,n;
  printf("Input x and n:");
  scanf("%d%d",&x,&n);
  printf("fun(%d,%d)=%d\n",x,n,fun(x,n));
}
